Origin & Secondary origins
What is secondary origin
We support configuring secondary origins for failover and load balancing (between sources).
How to configure secondary origins
You can configure secondary origins by going to CDN Resources ->Add new CDN resource.
When adding new CDN resources, multiple origins can be configured. However, it should be noted that the origin address cannot be duplicated.
Origin Policy
What is origin policy
The origin policy of LightCDN allows you to set the protocol for pull requests from CDN edge servers to origin servers.
How to set origin policy
You can set the origin policy in Resource Details → Basic Settings → Origins.
Select HTTP, HTTPS from the origin protocol selection box, as shown in the following figure.
Common problems with origin configuration errors
Error display: Too_Many_Redirects
When you use CDN and the browser displays Too_Many_redirects, it indicates that there is currently an infinite redirection phenomenon.
Troubleshooting methods
Common reasons | Solutions |
---|---|
The source site domain name set in the origin is consistent with the CDN hostname. If the domain name of the origin is the same as the domain name used by the user to access the CDN, the CDN will not be able to read the origin properly. | Please make sure to check the origin settings to prevent conflicts between the source site and other acceleration domain configurations. |
The origin address is HTTP, but automatic redirection to HTTPS is set on the source site, resulting in the origin constantly jumping between HTTP-HTTPS. | Method 1: Cancel the automatic redirection setting of the source site (or determine whether to redirect based on the current visited domain name, instead of forcing all redirects). Method 2: Change the origin to HTTPS origin policy to prevent automatic redirection of the source site. |
Host header mismatch. If the CDN does not use a Host that matches the user's request when returning to the origin (such as when the user visits www.example.com, but the CDN return Host is fixed as example.com), the origin may redirect the request to www.example.com by returning 301/302 based on its own configuration (such as forcing HTTPS or unified domain name) | Method 1: Enable 'Follow Origin'. Go to Origin rules → Origin server hostname → Select Follow Origin Method 2: Configure the correct Host. Go to Oigin rules → Origin server hostname → Select Customization, set the domain name requested by the user, and ensure that the origin responds directly to the content, rather than redirecting. Method 3: Check the origin configuration. Ensure that the origin does not trigger redirection logic for requests back to the origin server hostname(such as www.example.com). |